package com.example.mqtt.service.impl;

import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSON;
import com.aliyun.dysmsapi20170525.Client;
import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import com.aliyun.teaopenapi.models.Config;
import com.example.mqtt.service.SmsService;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author qwert
 * @version 1.0.0
 * @create 2025/5/2 18:48
 **/
@Service
public class SmsServiceImpl implements SmsService {

    private final static String BASE_URL = "https://push.spug.cc/send/GWorxoEEjOAQ";

    @Override
    public void sendMessage(String phone) {
        Map<String, Object> map = new HashMap<>();
        map.put("key1", "当前排队进度已结束，请在十分钟之内刷卡进入，过期不候");
        map.put("targets", phone);
        System.out.println(phone);
//        String response = HttpUtil.get(BASE_URL, map);
//        System.out.println(response);
    }
}
